package com.example.server.dao;

import com.example.server.entity.CusServer;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ServeDAO {

    @Select("select * from tb_server ")
    List<CusServer> queryDataAll();

    @Insert("insert into tb_server(cus_name,summary,serve_type,creator,create_time,assigner,status,serve_content,notes)" +
            " values(#{cus_name},#{summary},#{serve_type},#{creator},#{create_time},#{assigner},#{status},#{serve_content},#{notes})")
    void  add(CusServer cusServer);

    @Select("select * from tb_server")
    List<CusServer> queryAll();


}
